#!/bin/bash
cd /mnt/nas/work/webdav/openssl-1.1.1l

# NDK 目录
export ANDROID_NDK=/mnt/nas/work/ffmpeg-build-scripts/android-ndk-r21e
# 编译工具
export TOOLCHAIN_PREFIX=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64
export PREBUIL=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.9/prebuillinux-x86_64
export SYSTEMROOT=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot
# 添加编译工具目录
export PATH=$TOOLCHAIN_PREFIX/bin:$PREBUIL/bin:$PATH

# configure-x265.sh




API=21
ARCH=aarch64
HOST=aarch64-linux-android
SYSROOT=$ANDROID_NDK/platforms/android-${API}/arch-${ARCH}
CROSS_COMPILE=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-


./Configure \
no-asm \
no-tests \
no-shared \
no-comp \
--prefix=/mnt/nas/work/webdav/lib/arm64-v8a/op \
android-arm64 \
-D__ANDROID_API__=21 \
-I${SYSROOT}/usr/include \
--sysroot=${SYSROOT}
# --cross-compile-prefix=${CROSS_COMPILE}

make clean
make -j$(nproc)
make install



